﻿; (function () {

    'use strict';

    var watchs = {};
    window.stopwatch = {};

    stopwatch.start = function (name) {
        if (name) {
            watchs[name] = Date.now();
        }
    };

    stopwatch.end = function (name) {
        if (watchs[name]) {
            var val = name + ': ' + (Date.now() - watchs[name]) + 'ms';
            delete watchs[name];
            return val;
        }
    };


}());